package cn.smbms.controller;

import cn.smbms.pojo.Spare;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class JdController {

    private Logger logger = Logger.getLogger(Sji3Controller.class);

    @RequestMapping("/add")
    public String add(){
        return "add";
    }

    @RequestMapping("/save")
    public String save(Spare spare, Model modell){
        logger.info("新增的数据"+spare);
        modell.addAttribute("spare",spare);
        return "save";
    }

}
